﻿@inherits System.Web.Mvc.WebViewPage<IEnumerable<Pikapika.Models.NovelVolume>>

@{
    ViewBag.Title = "NovelVolume - List";
    
}


    <table>
        <tr>
            <th></th>
            <th>
                Id
            </th>
            <th>
                Name
            </th>
            <th>
                NovelId
            </th>
            <th>
                Description
            </th>
            <th>
                ImageUrl
            </th>
            <th>
                RatingPoints
            </th>
            <th>
                RatingCount
            </th>
            <th>
                SortIndex
            </th>
        </tr>

    @foreach (var item in Model) {
    
        <tr>
            <td>
                @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
                @Html.ActionLink("Details", "Details", new { id=item.Id }) |
                @Html.ActionLink("Delete", "Delete", new { id=item.Id }) |
                @Html.ActionLink("Chapters", "Index", "NovelChapter", new { novelVolumeId=item.Id }, null)
            </td>
            <td>
                @item.Id
            </td>
            <td>
                @item.Name
            </td>
            <td>
                @item.NovelId ( @item.Novel.Name )
            </td>
            <td>
                @item.Description.AutoEllipsis(20)
            </td>
            <td>
                @item.ImageUrl
            </td>
            <td>
                @item.RatingPoints
            </td>
            <td>
                @item.RatingCount
            </td>
            <td>
                @item.SortIndex
            </td>
        </tr>
    
    }

    </table>

    <p>
        @Html.ActionLink("Create New", "Create") | 
        @Html.ActionLink("Back to novels", "Index", "Novel", new { publisherId = Model.Any() ? (object)Model.First().Novel.PublisherId : null }, null)
    </p>


